package com.sec.etech.file.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sec.etech.file.model.EtechFileLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface EtechFileLogMapper extends BaseMapper<EtechFileLog> {

    /**
     * 根据fileid查询文件日志
     *
     * @param fileid
     * @return
     */
    @Select("select t1.action_,t1.uid_,t1.postdate_,t2.username from sys_file_log t1 left join wss_user t2 on t1.uid_ = t2.uid where t1.file_id_ = #{fileid} order by t1.postdate_ desc")
    List<EtechFileLog> getByFileId(@Param("fileid") String fileid);
}
